<template>
  <div class="popus">
    <div v-if="isShow" class="btn-box">
      <div class="left" @click="close">
        <van-icon name="arrow" />
      </div>
      <div class="item">
          <p class="title"><qq>TodayTaskIncome</qq></p>
          <p class="money">${{ form.todayTaskIncome }}</p>
      </div>
      <div class="item">
        <p class="title"><qq>TotalTackIncome</qq></p>
        <p class="money">${{ form.taskIncome }}</p>
      </div>
      <div class="item">
        <p class="title over-hide-1"><qq>InvitationRewards</qq></p>
        <p class="money">${{ form.vipCommissionIncome }}</p>
      </div>
      <div class="item">
        <p class="title over-hide-1"><qq>TotalRevenue</qq></p>
        <p class="money">${{ form.totalIncome }}</p>
      </div>

    </div>
    <div class="right" v-if="!isShow" @click="open">
      <van-icon name="arrow-left" />
    </div>
  </div>
</template>

<script>
export default {
  props:['form'],
  data(){
    return{
      isShow:false,
    }
  },
  methods:{
    open(){
      this.isShow=true
    },
    close(){
      this.isShow=false
    }
  }
}
</script>

<style scoped lang="scss">
.popus{
  position: fixed;
  top: 150px;
  right: 0;
  width: 100%;
  height: 82px;
  z-index: 999;
  display: flex;
  justify-content: center;
  .btn-box{
    width: 370px;
    height: 90px;
    background: #5A4CBB;
    border-radius: 10px 10px 10px 10px;
    display: flex;
    //justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    animation: linear 0.4s rightToLeft;

    box-sizing: border-box;
    .left{
      width: 28px;
      height: 90px;
      position: absolute;
      left: 0;
      color: #fff;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-right: 15px;
    }
    .item{
      width: 45%;
      height: 40px;
      text-align: center;
      padding: 8px 0;
      box-sizing: border-box;
      margin-left: 10px;
      .title{
        font-weight: 400;
        font-size: 12px;
        color: #FFFFFF;

      }
      .money{
        font-weight: bold;
        font-size: 13px;
        color: #FFFFFF;
      }
    }
  }

  .right{
    position: absolute;
    right: 0;
    width: 24px;
    height: 82px;
    background: #5A4CBB;
    box-shadow: 0px 4px 4px 0px rgba(0,0,0,0.25);
    border-radius: 10px 0 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 16px;
  }
  @keyframes rightToLeft {
    0%{
      right: -400px;
    }
    100%{
      right: 0;
    }
  }
}
</style>